package i7bac.view;

import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.GraphicsEnvironment;

import javax.swing.JFrame;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class MainFrame extends JFrame {
	
	private final Color BACKGROUND_COLOR = Color.black;
	private Container contentPane;

	/*
	 * Constructor
	 */
	public MainFrame() {
		super();

		// Frame settings
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBackground(BACKGROUND_COLOR);
		setResizable(false);
		setVisible(true);

		// Set to full screen
		GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(this);

		/*
		 * Set the Container as a CardLayout to manage the different Views on the same display space
		 */
		contentPane = getContentPane();
		contentPane.setLayout(new CardLayout(150,0));
		contentPane.setBackground(BACKGROUND_COLOR); //TODO

	}

	public void addView(JPanel view) {
		contentPane.add(view);
	}
	
	public void showHud() {
		
	}
}
